﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Pages/CommonPages/MasterPageBackEnd.master" AutoEventWireup="true" CodeFile="ManagerHome.aspx.cs" Inherits="Pages_ManagerPages_ManagerHome" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="block">
        <h2>Pesonal Info</h2>
        <ul>
            <li onclick="displayBlock('changePass')"><i class="fa fa-angle-right"></i>Change Password</li>
            <li onclick="displayBlock('updateInfo')"><i class="fa fa-angle-right"></i>Update Info</li>
        </ul>
    </div>
    <div class="block">
        <h2>PAGE</h2>
        <ul id="content-box-tabs">
            <li><i class="fa fa-angle-right"></i>Students
                <ul class="managerOption">
                    <li onclick="displayBlock('studentList')"><i class="fa fa-angle-right"></i>Search</li>
                    <li onclick="displayBlock('addStudent')"><i class="fa fa-angle-right"></i>Add</li>
                </ul>
            </li>
            <li><i class="fa fa-angle-right"></i>Staff
                <ul class="managerOption">
                     <li onclick="displayBlock('staffList')"><i class="fa fa-angle-right"></i>Search</li>
                     <li onclick="displayBlock('addStaff')"><i class="fa fa-angle-right"></i>Add</li>
                </ul>
             </li>
            <li><i class="fa fa-angle-right"></i>Competition
                <ul class="managerOption">
                    <li onclick="displayBlock('competitionList')"><i class="fa fa-angle-right"></i>Search</li>
                    <li onclick="displayBlock('addCompetition')"><i class="fa fa-angle-right"></i>Add</li>
                </ul>
            </li>
            <li><i class="fa fa-angle-right"></i>Design
                <ul class="managerOption">
                    <li onclick="displayBlock('designOfCompetition')"><i class="fa fa-angle-right"></i>Design of a Competition</li>
                </ul>
            </li>
        </ul>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <br />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <Triggers>
    <asp:PostBackTrigger ControlID="btnAddComp" />
    </Triggers>
        <ContentTemplate>
            <div id="changePass">
                <div class="updateStudent">
                    <h4>Change Password</h4>
                    <asp:Label ID="lblWarningChangePass" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="XX-Large" Font-Strikeout="False" Font-Underline="False" ForeColor="Red"></asp:Label>
                    <table class="addTable">
                        <tr>
                            <td>
                                <asp:Label ID="lblCurrentPass" runat="server" Text="Current Password :"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtCurrentPass" runat="server" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblNewPass" runat="server" Text="New Password :"></asp:Label>

                            </td>
                            <td>
                                <asp:TextBox ID="txtNewPass" runat="server" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblConfirmPass" runat="server" Text="Confirm Password :"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtConfirmPass" runat="server" TextMode="Password"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <asp:Button ID="btnChangePass" runat="server" Text="Change Password"
                                    ClientIDMode="Static" OnClick="btnChangePass_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div id="updateInfo">
                <div class="updateStudent">
                    <h4>Update Info</h4>
                    <asp:Label ID="lblWarningUpdateInfo" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="XX-Large" ForeColor="Red"></asp:Label>
                    <table class="addTable">

                        <tr>
                            <td>
                                <asp:Label ID="lblFullNameUpdate" runat="server" Text="Full name :"></asp:Label>

                            </td>
                            <td>
                                <asp:TextBox ID="txtFullNameUpdate" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblAddressUpdate" runat="server" Text="Address :"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="txtAddressUpdate" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblEmailUpdate" runat="server" Text="Email :"></asp:Label>

                            </td>
                            <td>
                                <asp:TextBox ID="txtEmailUpdate" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="lblPhoneUpdate" runat="server" Text="Phone :"></asp:Label>

                            </td>
                            <td>
                                <asp:TextBox ID="txtPhoneUpdate" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <asp:Button ID="btnUpdate" runat="server" Text="Update"
                                    ClientIDMode="Static" OnClick="btnUpdate_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div id="studentList">
                <h4>Student List</h4>
                <asp:Label ID="Label1" runat="server" Text="Name of Student: "></asp:Label>
                <asp:TextBox ID="txtSeachStudent" runat="server"></asp:TextBox>
                <asp:Button ID="btnSeachStudent" runat="server" Text="Search"
                    OnClick="btnSeachStudent_Click" />
                <asp:Button ID="btnDisplayAllStudent" runat="server"
                    Text="Display All Students" OnClick="btnDisplayAllStudent_Click" />
                <asp:GridView ID="grvStudent" runat="server"
                    AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="studentId"
                    PageSize="3" OnRowDataBound="grvStudent_RowDataBound" CssClass="mGrid" PagerStyle-CssClass="pgr">
                    <Columns>
                        <asp:BoundField DataField="studentId" HeaderText="Id"></asp:BoundField>
                        <asp:BoundField DataField="userName" HeaderText="User Name"></asp:BoundField>
                        <asp:BoundField DataField="pass" HeaderText="Password"></asp:BoundField>
                        <asp:BoundField DataField="fullName" HeaderText="Full Name"></asp:BoundField>
                        <asp:BoundField DataField="address" HeaderText="Address"></asp:BoundField>
                        <asp:BoundField DataField="email" HeaderText="Email"></asp:BoundField>
                        <asp:BoundField DataField="phoneNo" HeaderText="Phone No"></asp:BoundField>
                        <asp:BoundField DataField="major" HeaderText="Major"></asp:BoundField>
                        <asp:BoundField DataField="class" HeaderText="Class"></asp:BoundField>
                    </Columns>
                    <PagerStyle CssClass="pgr" />
                </asp:GridView>
            </div>
            <div id="addStudent" class="Add">
                <h4>Add Student</h4>
                <table class="addTable">
                    <tr>
                        <td>
                            <asp:Label ID="lblUsername" runat="server" Text="User Name :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblPass" runat="server" Text="Pass :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtPass" runat="server" TextMode="Password"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label14" runat="server" Text="Confirm Password: :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtConfirmSt" runat="server" TextMode="Password"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblFullName" runat="server" Text="Full name :"></asp:Label>

                        </td>
                        <td>
                            <asp:TextBox ID="txtFullName" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblAdress" runat="server" Text="Address :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtAddress" runat="server" ClientIDMode="Static"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <table class="addTable">
                    <tr>
                        <td>
                            <asp:Label ID="lblEmail" runat="server" Text="Email :"></asp:Label>

                        </td>
                        <td>
                            <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblPhone" runat="server" Text="Phone :"></asp:Label>

                        </td>
                        <td>
                            <asp:TextBox ID="txtPhone" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblMajor" runat="server" Text="Major :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtMajor" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblClass" runat="server" Text="Class :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtClass" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td><asp:Label ID="lblWarningAddStudent" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="XX-Large" ForeColor="Red"></asp:Label></td>
                        <td>
                            <asp:Button ID="Button1" runat="server" Text="Add"
                                ClientIDMode="Static" OnClick="btnAddStudent_Click" />
                        </td>
                    </tr>
                </table>
            </div>
            <div id="staffList">
                <h4>Staff List</h4>
                <asp:Label ID="Label2" runat="server" Text="Name of Staff: "></asp:Label>
                <asp:TextBox ID="txtSeachStaff" runat="server"></asp:TextBox>
                <asp:Button ID="btnSeachStaff" runat="server" Text="Search"
                    OnClick="btnSeachStaff_Click" />
                <asp:Button ID="btnDisplayAllStaffs" runat="server"
                    Text="Display All Staffs" OnClick="btnDisplayAllStaffs_Click" />
                <asp:GridView ID="grvStaff" runat="server" AutoGenerateColumns="False"
                    DataKeyNames="staffId" Width="682px"
                    OnRowDataBound="grvStaff_RowDataBound" CssClass="mGrid" PagerStyle-CssClass="pgr">
                    <Columns>
                        <asp:BoundField DataField="staffId" HeaderText="Id"></asp:BoundField>
                        <asp:BoundField DataField="userName" HeaderText="User Name"></asp:BoundField>
                        <asp:BoundField DataField="pass" HeaderText="Password"></asp:BoundField>
                        <asp:BoundField DataField="fullName" HeaderText="Full Name"></asp:BoundField>
                        <asp:BoundField DataField="address" HeaderText="Address"></asp:BoundField>
                        <asp:BoundField DataField="email" HeaderText="Email"></asp:BoundField>
                        <asp:BoundField DataField="phoneNo" HeaderText="Phone No"></asp:BoundField>
                        <asp:BoundField DataField="major" HeaderText="Major"></asp:BoundField>
                    </Columns>
                    <PagerStyle CssClass="pgr" />
                </asp:GridView>
            </div>
            <div id="addStaff" class="Add">
                <h4>Staff</h4>
                <asp:Label ID="lblWarningAddStaff" runat="server" Font-Bold="True" Font-Italic="True" Font-Size="XX-Large" ForeColor="Red"></asp:Label>
                <table class="addTable">
                    <tr>
                        <td>
                            <asp:Label ID="lblUserNameStaff" runat="server" Text="User Name :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtUserNameStaff" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblPassStaff" runat="server" Text="Pass :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtPassStaff" runat="server" TextMode="Password"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label15" runat="server" Text="Confirm Password: :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtConfirmStaff" runat="server" TextMode="Password"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblFullNameStaff" runat="server" Text="Full name :"></asp:Label>

                        </td>
                        <td>
                            <asp:TextBox ID="txtFullNameStaff" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblAddressStaff" runat="server" Text="Address :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtAddressStaff" runat="server" ClientIDMode="Static"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <table class="addTable">
                    <tr>
                        <td>
                            <asp:Label ID="lblEmailStaff" runat="server" Text="Email :"></asp:Label>

                        </td>
                        <td>
                            <asp:TextBox ID="txtEmailStaff" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblPhoneStaff" runat="server" Text="Phone :"></asp:Label>

                        </td>
                        <td>
                            <asp:TextBox ID="txtPhoneStaff" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="lblMajorStaff" runat="server" Text="Major :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtMajorStaff" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td></td>
                        <td>
                            <asp:Button ID="btnAddStaff" runat="server" Text="Add"
                                ClientIDMode="Static" OnClick="btnAddStaff_Click" />
                        </td>
                    </tr>
                </table>
            </div>
            <div id="competitionList">
                <h4>Competition List</h4>
                <asp:Label ID="Label3" runat="server" Text="Name of Competition: "></asp:Label>
                <asp:TextBox ID="txtSeachCompetition" runat="server"></asp:TextBox>
                <asp:Button ID="btnSeachCompetition" runat="server" Text="Search"
                    OnClick="btnSeachCompetition_Click" />
                <asp:Button ID="btnDisplayAllCompetition" runat="server"
                    Text="Display All Competition" OnClick="btnDisplayAllCompetition_Click" />
                <asp:GridView ID="grvCompetition" runat="server" AutoGenerateColumns="False" 
                    DataKeyNames="comId" AllowSorting="True"
                    PageSize="3" ForeColor="#FF9933"
                    OnRowDataBound="grvCompetition_RowDataBound" CssClass="mGrid" 
                    PagerStyle-CssClass="pgr">
                    <Columns>
                        <asp:BoundField DataField="comId" HeaderText="Id"></asp:BoundField>
                        <asp:BoundField DataField="name" HeaderText="Name"></asp:BoundField>
                        <asp:BoundField DataField="firstPrize" HeaderText="First Prize"></asp:BoundField>
                        <asp:BoundField DataField="secondPrize" HeaderText="Second Prize" />
                        <asp:BoundField DataField="thirdPrize" HeaderText="Third Prize" />
                        <asp:BoundField DataField="postDate" HeaderText="Post Date"
                            DataFormatString="{0:d}"></asp:BoundField>
                        <asp:BoundField DataField="startDate" HeaderText="Start Date"
                            DataFormatString="{0:d}"></asp:BoundField>
                        <asp:BoundField DataField="endDate" HeaderText="End Date"
                            DataFormatString="{0:d}"></asp:BoundField>
                        <asp:BoundField DataField="description" HeaderText="Description"></asp:BoundField>
                        <asp:BoundField DataField="quotation" HeaderText="Quotation"></asp:BoundField>
                        <asp:BoundField DataField="userName" HeaderText="Manager"></asp:BoundField>
                    </Columns>
                    <PagerStyle CssClass="pgr" />
                </asp:GridView>
            </div>
            <div id="addCompetition" class="Add">
                <h4>Add Competition</h4>
                <table class="addTable">
                    <tr>
                        <td>
                            <asp:Label ID="Label4" runat="server" Text="Name: "></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCompetitionName" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label5" runat="server" Text="Start Date: "></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCompetitionStartDate" CssClass="datetimePicker" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label6" runat="server" Text="End Date: "></asp:Label>

                        </td>
                        <td>
                            <asp:TextBox ID="txtCompetitionEndDate" CssClass="datetimePicker" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label7" runat="server" Text="Description: "></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCompetitionDescription" runat="server" TextMode="MultiLine"
                                ClientIDMode="Static"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label13" runat="server" Text="Image: "></asp:Label>
                        </td>
                        <td>
                            <asp:FileUpload ID="fileCompImage" runat="server" />
                        </td>
                    </tr>
                </table>
                <table class="addTable">
                    <tr>
                        <td>
                            <asp:Label ID="Label8" runat="server" Text="First Prize: "></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtFirstPrize" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label11" runat="server" Text="Second Prize: "></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtSecondPrize" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label12" runat="server" Text="Third Prize: "></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtThirdPrize" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Label ID="Label10" runat="server" Text="Quotation :"></asp:Label>
                        </td>
                        <td>
                            <asp:TextBox ID="txtCompetitionQuotation" runat="server" TextMode="MultiLine"
                                ClientIDMode="Static"></asp:TextBox>
                        </td>
                    </tr>
                </table>
                <asp:GridView ID="grvStaffList" runat="server" AutoGenerateColumns="False"
                    CssClass="mGrid" PagerStyle-CssClass="pgr" AllowPaging="True" PageSize="5"
                    Width="673px">
                    <Columns>
                        <asp:BoundField DataField="staffId" HeaderText="Staff Id" />
                        <asp:BoundField DataField="fullName" HeaderText="Full Name" />
                        <asp:BoundField DataField="major" HeaderText="Major" />
                        <asp:TemplateField AccessibleHeaderText="Chose">
                            <ItemTemplate>
                                <asp:CheckBox ID="ckChose" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                </asp:GridView>
                <td>
                    <asp:Button ID="btnAddComp" runat="server" Text="Add Competition"
                        OnClick="addComp_Click" />
            </div>
            <div id="designOfCompetition">
                <h4>Competition List</h4>
                <asp:Label ID="Label16" runat="server" Text="Name of Competition: "></asp:Label>
                <asp:TextBox ID="txtSearchComp" runat="server"></asp:TextBox>
                <asp:Button ID="btnSeachComp" runat="server" Text="Search" 
                    onclick="btnSeachComp_Click"/>
                <asp:Button ID="btnDisplayAll" runat="server"
                    Text="Display All Competition" onclick="btnDisplayAll_Click"/>
                <asp:GridView ID="grvComp" runat="server" AutoGenerateColumns="False"
                    AllowPaging="True" DataKeyNames="comId" AllowSorting="True"
                    PageSize="3" ForeColor="#FF9933" CssClass="mGrid" 
                    PagerStyle-CssClass="pgr" onrowdatabound="grvComp_RowDataBound">
                    <Columns>
                        <asp:BoundField DataField="comId" HeaderText="Id"></asp:BoundField>
                        <asp:BoundField DataField="name" HeaderText="Name"></asp:BoundField>
                        <asp:BoundField DataField="firstPrize" HeaderText="First Prize"></asp:BoundField>
                        <asp:BoundField DataField="secondPrize" HeaderText="Second Prize" />
                        <asp:BoundField DataField="thirdPrize" HeaderText="Third Prize" />
                        <asp:BoundField DataField="postDate" HeaderText="Post Date"
                            DataFormatString="{0:d}"></asp:BoundField>
                        <asp:BoundField DataField="startDate" HeaderText="Start Date"
                            DataFormatString="{0:d}"></asp:BoundField>
                        <asp:BoundField DataField="endDate" HeaderText="End Date"
                            DataFormatString="{0:d}"></asp:BoundField>
                        <asp:BoundField DataField="description" HeaderText="Description"></asp:BoundField>
                        <asp:BoundField DataField="quotation" HeaderText="Quotation"></asp:BoundField>
                        <asp:BoundField DataField="userName" HeaderText="Manager"></asp:BoundField>
                    </Columns>
                    <PagerStyle CssClass="pgr" />
                </asp:GridView>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

